Sunan at-Tirmithiy كتاب الزهد باب ما جاء فى قصر الأمل

حَدَّثَنَا مَحْمُودُ بْنُ غَيْلاَنَ حَدَّثَنَا أَبُو أَحْمَدَ حَدَّثَنَا سُفْيَانُ عَنْ لَيْثٍ عَنْ مُجَاهِدٍ عَنِ ابْنِ عُمَرَ قَالَ أَخَذَ رَسُولُ اللَّهِ صلى الله عليه وسلم بِمِنْكَبِى فَقَالَ كُنْ فِى الدُّنْيَا كَأَنَّكَ غَرِيبٌ أَوْ عَابِرُ سَبِيلٍ وَعُدَّ نَفْسَكَ فِى أَهْلِ الْقُبُورِ. فَقَالَ لِى ابْنُ عُمَرَ إِذَا أَصْبَحْتَ فَلاَ تُحَدِّثْ نَفْسَكَ بِالْمَسَاءِ وَإِذَا أَمْسَيْتَ فَلاَ تُحَدِّثْ نَفْسَكَ بِالصَّبَاحِ وَخُذْ مِنْ صِحَّتِكَ قَبْلَ سَقَمِكَ وَمِنْ حَيَاتِكَ قَبْلَ مَوْتِكَ فَإِنَّكَ لاَ تَدْرِى يَا عَبْدَ اللَّهِ مَا اسْمُكَ غَدًا. قَالَ أَبُو عِيسَى وَقَدْ رَوَى هَذَا الْحَدِيثَ الأَعْمَشُ عَنْ مُجَاهِدٍ عَنِ ابْنِ عُمَرَ نَحْوَهُ.
The Messenger of God, peace and blessings of God be upon him, took hold of my shoulder and said, "Be in the worldly life like a stranger or a wayfarer, and count yourself among the inhabitants of the grave (the dead)." Ibn-'Umar then added, "If you live till the morning, do not expect the evening and if you live till the evening, do not expect the morning. Take advantage of your good health before you fall ill and of your life before you die; for you do not know, bondsman of God, what your state will be tomorrow (1)." Footnotes: (1) i.e. whether you would be among 'the dead' or 'the living'. Click on ḥadīth to read more